package org.fm.demo.test;

import cn.org.atool.generator.FileGenerator;
import cn.org.atool.generator.annotation.Table;
import cn.org.atool.generator.annotation.Tables;
import org.junit.Ignore;
import org.junit.Test;

import static org.fm.demo.test.Generator.*;

public class Generator {
    static final String URL = "jdbc:mysql://localhost:3306/fluent_mybatis?useUnicode=true&characterEncoding=utf8";

    static final String SrcDir = "src/main/java";
    /**
     * 本演示不要测试辅助类, 生成到target目录下丢弃
     */
    static final String TestDir = "target/test";

    static final String BasePack = "org.fm.demo.shared";

    @Ignore
    @Test
    public void generate() {
        FileGenerator.build(
            Empty.class
        );
    }
}

@Tables(url = URL, username = "root", password = "password",
    srcDir = SrcDir, testDir = TestDir, basePack = BasePack,
    gmtCreated = "gmt_created", gmtModified = "gmt_modified", logicDeleted = "is_deleted",
    tables = {
        @Table(value = "student")
    })
class Empty {
}